package collectiondemo;

//以下实例演示了如何使用 Collections 类的 max() 和 min() 方法来获取List中最大最小值：
public class MainDemo2 {

    public static void main(String[] args) {
        java.util.List list = java.util.Arrays.asList("one Two three Four five six one three Four".split(" "));
        System.out.println(list);
        System.out.println("最大值: " + java.util.Collections.max(list));
        System.out.println("最小值: " + java.util.Collections.min(list));
    }
}
